<!--
 * @description: 
 * @Author: vikingShip
 * @Date: 2021-11-04 14:20:04
 * @LastEditors: vikingShip
 * @LastEditTime: 2022-01-07 10:35:38
-->
<template>
  <!-- 空白占位 -->
  <view :style="inlineStyle"></view>
</template>

<script lang="ts">
  interface BlankHeight {
    /** 空白高度 */
    height: number;
  }
  import {
    Component,
    Vue,
    Prop,
    Watch
  } from 'vue-property-decorator'

  @Component({})
  export default class BlankPaceholder extends Vue {
    @Prop({
      type: Object,
      default: {
        height: 0
      }
    })
    decoretionProperties: BlankHeight;
    @Watch("decoretionProperties")
    onPropUpdate() {
      this.formData = this.decoretionProperties
    }


    formData: BlankHeight = {
      height: 0
    }
    /** 样式 */
    inlineStyle: string = ""

    mounted(){
      this.formData = this.decoretionProperties
      this.setInlineStyle()
    }

    /**
     * 样式
     */
    setInlineStyle() {
      const {
        height
      } = this.formData;
      this.inlineStyle = `height:${height}px;background-color:#fff;`
    }
  }
</script>

<style></style>